﻿@model IEnumerable<GroceryPriceBook.Core.ViewModel.PurchaseLog>

@{
	ViewBag.Title = "Index";
}

<div class="row">
	<div class="large-12">
		<div class="row">
			<div class="large-12">
				<p>
					@Html.ActionLink("Create New", "Create")
				</p>
			</div>
		</div>
		<div class="row">
			<div class="large-12">
				<table>
					<thead>
						<tr>
							<th>Purchase Date
							</th>
							<th>Total Cost
							</th>
							<th>Store Name
							</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
						@foreach (var item in Model)
						{
							<tr>
								<td>
									@Html.DisplayFor(modelItem => item.PurchaseDate)
								</td>
								<td>
									@Html.DisplayFor(modelItem => item.TotalCost)
								</td>
								<td>
									@Html.DisplayFor(modelItem => item.Store.Name)
								</td>
								<td>
									@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
									@Html.ActionLink("Details", "Details", new { id = item.Id }) |
									@Html.ActionLink("Delete", "Delete", new { id = item.Id })
								</td>
							</tr>
						}
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
